{% extends 'common/templates/base_sidebar.html' %}
{% load nonce avatar vcard actor %}
{% block title %}
  {% ifequal request.user.nick view.nick %}
  Your {{POST_NAME}}s
  {% else %}
  {{POST_NAME}}s from {{ view.display_nick }}
  {% endifequal %}
{% endblock %}

{% block content %}

{% ifequal request.user.nick view.nick %}
  {% include 'common/templates/message_form.html' %}
{% else %}
  {% include 'form_error.html' %}
  <div class="main">
    <div class="vcard" id="profile">
      {% with view as actor %}
        {% include 'common/templates/vcard_full.html' %}
      {% endwith %}

      {% if request.user %}
        {% if user_is_contact %}
        <p class="contact">
          {{view.display_nick}} is your contact.
          {% actor_remove_contact request.user request.user view %}
        </p>
        {% else %}
        <p>
          {% actor_add_contact_long request.user request.user view %}
        </p>
        {% endif %}
      {% endif %}
    </div>
  </div>
{% endifequal %}

{% ifequal view.nick request.user.nick %}
<ul id="sub-nav">
  <li class="first">
    <a href="{{view.url}}/overview">Overview</a>
  </li>
  <li class="current">
  <a href="{{view.url}}">Your {{POST_NAME}}s</a>
  </li>
</ul>
{% endifequal %}

{% ifequal request.user.nick view.nick %}
<h2>Your {{POST_NAME}}s</h2>
{% else %}
<h2>{{POST_NAME}}s from {{ view.display_nick }}</h2>
{% endifequal %}


<div id='stream'>
  {% include 'common/templates/stream.html' %}
  {% include 'common/templates/paging.html' %}
  {% include 'common/templates/feeds.html' %}
</div>
{% endblock %}

{% block sidebar %}
{% if not user_is_private %}
  {% include 'common/templates/sidebar_location.html' %}
  {% include 'common/templates/sidebar_contacts.html' %}
  {% with view_streams as streams %}
    {% include 'common/templates/sidebar_streams.html' %}
  {% endwith %}
{% else %}
  {% include 'actor/templates/sidebar_privateuser.html' %}
{% endif %}
{% endblock %}
